package Tank2;

import Tank3.GameObject;

import java.awt.*;
import java.awt.event.KeyEvent;

public abstract class Tank implements GameObject {
	protected int x = 100;
	protected int y = 100;
	
	private int w = 50;
	private int h = 50;
	
	protected int speed = 10;
	
	private Image image = Toolkit.getDefaultToolkit().getImage("src\\images\\tankD_red.gif");
	
	public Tank(){}
	
	public Tank(int x,int y,int w,int h,int speed,Image image){
		this.x = x;
		this.y = y;
		this.w = w;
		this.h = h;
		this.speed = speed;
		this.image = image;
	}
	
	public Tank(int x,int y){
		this.x = x;
		this.y = y;
		
	}
	
	public abstract void move(KeyEvent e);
	
	public abstract void paint(Graphics g);
	

	
	//
	public Rectangle getRectangle(){
		return new Rectangle(x,y,w,h);
	}
	
	
	
	
}
